Method and apparatus for decoding a video signal

ABSTRACT

The present invention relates to a method for decoding a video signal, comprising the steps of: acquiring a transform size flag of the current macroblock from a video signal; checking the number of non-zero transform coefficients at each pixel position in a first transform block which corresponds to the transform size flag; changing a scan order of the first transform block by prioritizing the position of the pixel having the greatest number of the non-zero transform coefficients in the first transform block; determining the number of the non-zero transform coefficients at each pixel position in a second transform block, and setting the changed scan order of the first transform block as an initialized scan order of the second transform block; adding the number of the non-zero transform coefficients at each pixel position in the first transform block and the number of the non-zero transform coefficients at each pixel position in the second transform block, and changing the scan order of the second transform block by prioritizing the position of the pixel having the greatest number of the non-zero transform coefficients; and decoding the transform coefficients arranged in the scan order changed in the previous step, wherein the first transform block and the second transform block have sizes corresponding to the transform size flag, and are contained in the current macroblock.

TECHNICAL FIELD

The present invention relates to a method and apparatus for decoding avideo signal.

BACKGROUND ART

Compression coding means a series of signal processing techniques fortransmitting digitalized information via a communication circuit orsaving the digitalized information in a form suitable for a storagemedium. As targets of compression coding, there are audio, video,characters, etc. In particular, a technique for performing compressioncoding on a video is called video sequence compression. A video sequenceis generally characterized in having spatial redundancy and temporalredundancy.

DISCLOSURE OF THE INVENTION Technical Problem

However, if the spatial redundancy and the temporal redundancy are notsufficiently eliminated, a compression rate may be lowered in coding avideo signal. On the other hand, if the spatial redundancy and thetemporal redundancy are excessively eliminated, it is unable to generateinformation required for decoding a video signal to degrade a decodingrate.

Technical Solution

An object of the present invention is to adaptively define a size of aunit block used for a transform process.

Another object of the present invention is to define flag informationindicating a size of a unit block used for a transform process.

Another object of the present invention is to define flag informationindicating a transform type.

Another object of the present invention is to use a transform scheme(e.g., DCT, KLT, etc.) suitable for a prediction mode of a macro block.

Another object of the present invention is to adaptively use a size of aunit block used for a transform process in a manner of setting the sizeequal to or smaller than that of a residual block.

Another object of the present invention is to use a transform kerneldifferent for each transform block of a macro block coded by an intraprediction mode.

Another object of the present invention is to update a scanning orderfor each transform block of a macroblock.

A further object of the present invention is to eliminate redundancy ofinformation indicating whether a non-zero transform coefficient level isincluded.

Advantageous Effects

Accordingly, the present invention defines various sizes of unit blockused for a transform process, thereby improving coding efficiency.

The present invention defines flag information indicating a size of aunit block used for a transform process, thereby improving codingefficiency.

The present invention defines flag information indicating a transformtype and then uses discrete cosine transform (hereinafter abbreviatedDCT) or Karhunen-Loeve transform (hereinafter abbreviated KLT), therebyimproving coding efficiency.

The present invention uses DCT or KLT in accordance with a predictionmode of a macro block, thereby improving coding efficiency.

The present invention adaptively uses a size of a unit block used for atransform process in a manner of setting the size equal to or smallerthan that of a residual block, thereby improving coding efficiency.

The present invention uses a transform kernel different for eachtransform block of a macro block coded by an intra prediction mode,thereby improving coding efficiency.

The present invention updates a scanning order for each transform blockof a macroblock, thereby improving coding efficiency.

The present invention eliminates redundancy of information indicatingwhether a non-zero transform coefficient level is included, therebyimproving coding efficiency.

If the present inventions are used for an encoding/decoding processbased on a macro block greater than 16×16 macroblock, coding efficiencycan be further improved.

DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic block diagram of a video signal decoding apparatusaccording to an embodiment of the present invention.

FIGS. 2 to 3B are diagrams of a process for determining a size of a unitblock used for a transform process based on flag information accordingto embodiments of the present invention.

FIG. 4 is a flowchart to describe a process for determining a transformscheme (DCT or KLT) based on a flag indicating a transform type or aprediction mode of a macroblock according to an embodiment of thepresent invention.

FIG. 5 is a schematic block diagram to describe a new mode dependentdirectional transform for applying a different transform kernel inaccordance with a position of a transform block according to anembodiment of the present invention.

FIG. 6 is a diagram of a detailed example using a different transformkernel in accordance with a position of a transform block according toan embodiment of the present invention.

FIG. 7 is a flowchart to describe a process for rearranging a scan orderfor each transform block according to an embodiment of the presentinvention.

FIGS. 8A to 8D are diagrams of detailed examples to describe a processfor rearranging a scan order for each transform block according toembodiments of the present invention.

BEST MODE FOR INVENTION

To achieve these and other advantages and in accordance with the purposeof the present invention, as embodied and broadly described, a method ofdecoding a video signal according to the present invention may includethe steps of obtaining a transform size flag of a current macroblockfrom the video signal, counting the number of non-zero transformcoefficients at each pixel position in a 1^(st) transform block for the1^(st) transform block corresponding to the transform size flag,modifying a scan order of the 1^(st) transform block by prioritizing aposition of a pixel having the greatest number of the non-zero transformcoefficients in the 1^(st) transform block, if the number of non-zerotransform coefficients at each pixel position in a 2^(nd) transformblock is determined, setting the modified scan order of the 1^(St)transform block to an initialized scan order of the 2^(nd) transformblock, modifying a scan order of the 2^(nd) transform block in a mannerof adding the number of the non-zero transform coefficients at eachpixel position in the 1^(st) transform block to the number of thenon-zero transform coefficients at each pixel position in the 2^(nd)transform block and then prioritizing a position of a pixel having thegreatest number, and decoding transform coefficients arranged inaccordance with the modified scan order, wherein the 1^(st) transformblock and the 2^(nd) transform block have a size corresponding to thetransform size flag and is included in the current macroblock.

Preferably, the method may further include the step of obtaining scanorder initialization flag information indicating whether to initializethe scan order for each transform block in the current macroblock,wherein if the scan order initialization flag information indicates toinitialize the scan order for the each transform block, the initializedscan order of the 2^(nd) transform block is set to the modified scanorder of the 1^(st) transform block.

Preferably, the transform size flag information may include a pluralityof transform size flag informations.

More preferably, the transform size flag information may include a1^(st) transform size flag information indicating whether a transformprocess is performed by 16×16 block unit or a block unit smaller thanthe 16×16 block unit and a 2^(nd) transform size flag informationindicating whether the transform process is performed by 8×8 block unitor 4×4 block unit.

In this case, if the 1^(st) transform size flag information indicatesthat the transform process is performed by the block unit smaller thanthe 16×16 block unit and the 2^(nd) transform size flag informationindicates that the transform process is performed by the 8×8 block unit,the 1^(st) transform block and the 2^(nd) transform block may correspondto 8×8 block.

Preferably, the method may further include the step of obtaining atransform type flag information indicating a transform type from thevideo signal, wherein the transform coefficient decoding step usesdiscrete cosine transform (DCT) or Karhuhen-Loeve transform (KLT) basedon the transform type flag information.

More preferably, if the transform type flag information indicates to usethe Karhuhen-Loeve transform (KLT) and the block type of the currentmacroblock indicates an intra block, the transform coefficient may bedecoded using the Karhuhen-Loeve transform (KLT).

To further achieve these and other advantages and in accordance with thepurpose of the present invention, an apparatus for decoding a videosignal according to the present invention may include an entropydecoding unit obtaining a transform size flag of a current macroblockfrom the video signal, a 1^(st) scan order modifying unit counting thenumber of non-zero transform coefficients at each pixel position in a1^(st) transform block for the 1^(st) transform block corresponding tothe transform size flag, the 1^(st) scan order modifying unit modifyinga scan order of the 1^(st) transform block by prioritizing a position ofa pixel having the greatest number of the non-zero transformcoefficients in the 1^(st) transform block, a 2^(nd) scan ordermodifying unit determining the number of non-zero transform coefficientsat each pixel position in a 2^(nd) transform block, the 2^(nd) scanorder modifying unit setting the modified scan order of the 1^(st)transform block to an initialized scan order of the 2^(nd) transformblock, the 2^(nd) scan order modifying unit modifying a scan order ofthe 2^(nd) transform block in a manner of adding the number of thenon-zero transform coefficients at each pixel position in the 1^(st)transform block to the number of the non-zero transform coefficients ateach pixel position in the 2^(nd) transform block and then prioritizinga position of a pixel having the greatest number, and a transformdecoding unit decoding transform coefficients arranged in accordancewith the modified scan order, wherein the 1^(st) transform block and the2^(nd) transform block have a size corresponding to the transform sizeflag and is included in the current macroblock.

Mode for Invention

Looking into a bit sequence configuration of a video signal, thereexists a separate layer structure called a NAL (network abstractionlayer) between a VCL (video coding layer) dealing with a moving pictureencoding process itself and a lower system that transports and storesencoded information. An output from an encoding process is VCL data andis mapped by NAL unit prior to transport or storage. Each NAL unitincludes compressed video data or RBSP (raw byte sequence payload:result data of moving picture compression) that is the datacorresponding to header information.

The NAL unit basically includes two parts, a NAL header and an RBSP. TheNAL header includes flag information (nal_ref_idc) indicating whether aslice as a reference picture of the NAL unit is included and anidentifier (nal_unit_type) indicating a type of the NAL unit. Compressedoriginal data is stored in the RBSP. And, RBSP trailing bit is added toa last portion of the RBSP to represent a length of the RBSP as an 8-bitmultiplication. As the types of the NAL unit, there are IDR(instantaneous decoding refresh) picture, SPS (sequence parameter set),PPS (picture parameter set), SEI (supplemental enhancement information),and the like.

In the standard, requirements for various profiles and levels are set toenable implementation of a target product with an appropriate cost. Inthis case, a decoder should meet the requirements decided according thecorresponding profile and level. Thus, two concepts, ‘profile’ and‘level’ are defined to indicate a function or parameter for representinghow far the decoder can cope with a range of a compressed sequence. And,a profile identifier (profile_idc) can identify that a bit stream isbased on a prescribed profile. The profile identifier means a flagindicating a profile on which a bit stream is based. For instance, inH.264/AVC, if a profile identifier is 66, it means that a bit stream isbased on a baseline profile. If a profile identifier is 77, it meansthat a bit stream is based on a main profile. If a profile identifier is88, it means that a bit stream is based on an extended profile.Moreover, the profile identifier may mean an identification informationindicating that an inputted bitstream is coded into a data of a specifictype. For instance, the profile identifier may indicate a multiviewvideo coded bitstream or a stereo video coded bitstream. Besides, theprofile identifier may be included in a sequence parameter set.

Sequence parameter set may indicate header information containinginformation crossing over encoding of an overall sequence such as aprofile, a level, and the like. A whole compressed video, i.e., asequence should start with a sequence header. Hence, a sequenceparameter set corresponding to header information should arrive at adecoder before the data, which will refer to the parameter set, arrives.Namely, the sequence parameter set RBSP plays a role as the headerinformation for the result data of the video compression. Once a bitstream is inputted, a profile identifier preferentially identifies thatthe inputted bit stream is based on which one of a plurality ofprofiles.

FIG. 1 is a schematic block diagram of an apparatus for decoding a videosignal according to the present invention.

Referring to FIG. 1, the decoding apparatus may include an entropydecoding unit 100, a dequantizing unit 200, an inverse transform unit300, an intra prediction unit 400, a deblocking filter unit 500, adecoded picture buffer unit 600, an inter prediction unit 700, and thelike. And, the inverse transform unit 300 may include a transform sizedetermining unit 310, a scan order initializing unit 320, a scan ordermodifying unit 330 and a transform decoding unit 340.

First of all, the decoding apparatus may perform parsing by a unit ofNAL to decode a received video signal. In general, at least one sequenceparameter set and at least one picture parameter set may be transferredto a decoder before a slice header and slice data are decoded. In thiscase, various kinds of configuration informations may be included in aNAL header region or an extension region of a NAL header.

The entropy decoding unit 100 performs entropy decoding on a parsed bitstream and a coefficient of each macroblock, a motion vector and thelike are then extracted. The dequantizing unit 200 obtains a transformcoefficient value by multiplying the entropy-decoded data by apredetermined constant and the inverse transform unit 300 thentransforms the transform coefficient value inversely to reconstruct apixel value. In doing so, the transform size determining unit 310obtains transform size related information and may be then able todetermine a transform size. For instance, adaptive transform size flaginformation, transform size flag information and the like may beobtained. This shall be described in detail with reference to FIG. 2,FIG. 3A and FIG. 3B later. The scan order initializing unit 320initializes a scan order for the dequantized transform coefficients andthe scan order modifying unit 330 modifies or updates the scan orderinto a scan order suitable for each block based on a count of non-zerotransform coefficient(s). The transform decoding unit 340 decodes thetransform coefficients based on the modified or updated scan order.Meanwhile, if the count of the transform coefficient values is furtherdecremented through this transform process, an encoding apparatus may beable to raise a compression effect. And, if intra-picture important dataare further intensively distributed on some coefficients, thecompression effect can be further raised. Therefore, embodiments forthis transform process are explained in the description of the presentinvention.

The intra prediction unit 400 performs intra prediction from a decodedsample within a current picture. The intra prediction unit 400 predictsa current block using pixels of a block neighbor to a current blockwithin the current picture. If the prediction is performed moreprecisely, coding efficiency can be improved as well as image quality.

Meanwhile, the deblocking filter unit 500 is applied to each codedmacroblock to reduce block distortion. A filter may smooth a block edgeto enhance an image quality of a decoded frame. Selection of a filteringprocess depends on a boundary strength and a gradient of an image samplearound a boundary. Pictures through filtering are outputted or saved inthe decoded picture buffer unit 600 to be used as reference pictures.

The decoded picture buffer unit 600 plays a role in storing or openingthe previously coded pictures to perform inter prediction. In doing so,in order to save the pictures in the decoded picture buffer unit 600 orto open the pictures, information ‘frame_num’ indicating a decodingorder of each picture and information ‘POC (picture order count)’indicating an output order of picture may be used. The referencepictures managed in the above manner may be used by the inter predictionunit 700.

The inter prediction unit 700 compensates for a motion of a currentblock using informations transferred from the entropy decoding unit 100.Motion vectors of blocks neighbor to the current block are extractedfrom a video signal and a motion vector prediction value of the currentblock is then obtained. And, the motion of the current block iscompensated using the obtained motion vector prediction value and adifferential vector extracted from the video signal. And, it may be ableto perform the motion compensation using one reference picture or aplurality of pictures.

The decoding apparatus may obtain a prediction value (i.e., predictor)generated by inter or intra prediction in accordance with predictionmode information. By adding a residual extracted from the video signaland the obtained prediction value together, it may be able toreconstruct a current picture. In this case, the residual may indicate adifferent between an original signal and a prediction signal. Thissignal can have one of a sequence unit, a picture unit, a slice unit, amacroblock unit, a sub-block unit and a pixel unit. In thisspecification, each of the units can be interpreted as a unit suitablefor each decoding process.

The present invention may be used for the processing of a video signalhaving a further extended resolution. In particular, for the processingof the video signal having the extended resolution, it may be able todefine a macroblock of an extended size. For instance, macroblocks ofsizes including 32×32, 64×32, 32×64, 64×64 and the like may be usable aswell as macroblocks of sizes including 16×16, 16×8, 8×16, 8×8, 8×4, 4×8and 4×4. A size of a macroblock may be determined adaptively inaccordance with resolution of a video signal. For instance, ifresolution of a video signal is equal to or smaller than VGA (e.g.,640×480, 4:3), a macroblock of 16×16 size may be usable. If resolutionof a video signal is equal to or greater than VGA and equal to orsmaller than 1080P, a macroblock of 32×32 size may be usable. Ifresolution of a video signal is equal to or greater than 1080P and equalto or smaller than 4 k×2 k, a macroblock of 64×64 size may be usable.

FIGS. 2 to 3B are diagrams of a process for determining a size of a unitblock used for a transform process based on flag information accordingto embodiments of the present invention.

First of all, transform schemes used for an encoding/decoding apparatusmay include a block based transform scheme and an image based transformscheme. The block based transform scheme may include one of discretecosine transform (hereinafter abbreviated DCT), Karhuhen-Loeve transform(hereinafter abbreviated KLT) and the like. In this case, the discretecosine transform (DCT) means that a signal in spatial domain is resolved(or transformed) into 2-dimensiaonl frequency components. A frequencycomponent gets lower toward a left top side within a block or getshigher toward a right bottom size within the block, thereby forming aprescribed pattern within the block. For instance, one frequencycomponent situated at a most left top side among 64 2-dimensionalfrequency components is a component having a frequency set to 0 as adirect current (DC) component and the rest of the 2-dimensionalfrequency components are AC (alternate current) components including 63frequency components ranging from a low frequency component to a highfrequency component. If the discrete cosine transform (DCT) isperformed, it may mean that a size of each of base components (64 basicpattern components) included in a block of an original video signal isfound. And, this size becomes a discrete cosine component coefficient.

The discrete cosine transform (DCT) is the transform simply used for therepresentation with an original video signal component, by which afrequency component can be completely reconstructed into an originalvideo signal in case of inverse transform. Namely, by changing a videorepresenting method only, all information included in an original videocan be kept as well as redundant information. If the discrete cosinetransform (DCT) is performed on an original video, a discrete cosinetransform (DCT) coefficient exists in a manner of gathering into a valuenear 0. Using this property, it may be able to obtain a high compressioneffect.

Meanwhile, the Karhuhen-Loeve transform (KLT) is one of schemes forprocessing data in a manner of reducing dimensions into lowerdimension(s) (e.g., K dimensions) for data consisting of feature vectorsof poly-dimensions (e.g., K dimensions) by maintaining originalinformation to the maximum. In particular, unique components indicatingfeatures of data well are extracted and values having high featurecomponents are taken from the extracted components, whereby dimensionscan be reduced and the difference from the original information can beminimized. For instance, the Karhuhen-Loeve transform (KLT) scheme maybe usable in accordance with a prediction mode used for encoding ordecoding of an intra block. A scanning order scheme is applieddifferently in accordance with the prediction mode, whereby codingefficiency can be raised.

According to one embodiment of the present invention, a size of a unitblock (hereinafter named a transform size) used for a transform processfor one macroblock may be adaptively set. For instance, in case ofprocessing a video signal having high resolution, a transform size maybe determined to be suitable for the resolution of the video signal. Inparticular, when 32×32 macroblock is used for a video signal havingresolution of XGA (extended graphics array: 1024×768 or 4:3), atransform size may be set to 16×16. In this case, a transform processmay be performed on 32×32 block using 16×16 transform size only.Alternatively, a transform process may be performed using at least onetransform size selected from the group including 32×32, 32×16, 16×32,16×16, 16×8, 8×16, 8×8, 8×4, 4×8, and 4×4. In particular, a singletransform size may be usable for one macroblock or a plurality oftransform sizes may be usable for one macroblock.

The present invention may be able to define adaptive transform size flaginformation that enables a setting of a transform size suitable for eachblock. In this case, the adaptive transform size flag information may bedefined as information indicating whether a coding unit is partitionedin to coding units each of which has a half size in horizontal andvertical directions. In this case, the coding unit may mean one of apicture, a slice, a macroblock, a sub-block, a transform block, a block,a pixel and the like. Namely, if the adaptive transform size flaginformation of a 1^(st) coding unit is true, the adaptive transform sizeflag information can be obtained for each 2^(nd) coding unit. In thiscase, the 2^(nd) coding unit may indicate a sub-block included in the1^(st) coding unit. The adaptive transform size flag information may beobtained by the transform unit or the inverse transform unit 300, andmore particularly, by the transform size determining unit 310. Theadaptive transform size flag information may be obtained in a manner ofcomparing a size of a current transform unit to at least one of aminimum transform size and a maximum transform size. For instance, if asize of a current transform unit is greater than a minimum transformsize and equal to or smaller than a maximum transform size, the adaptivetransform size flag information can be obtained. Based on the adaptivetransform size flag information, a size of a transform unit may bedetermined and a transform process may be then performedcorrespondingly. Alternatively, based on the adaptive transform sizeflag information, coded block flag information (coded_block_flag) may beobtained. In this case, the coded block flag information(coded_block_flag) may indicate whether a transform unit includes anon-zero transform coefficient level.

For instance, if a size of the 1^(st) coding unit is 128×128, the 2^(nd)coding unit can indicate 4 sub-blocks each of which has 64×64 size. Ifthe adaptive transform size flag information does not exist, it may beable to derive the adaptive transform size flag information in a mannerof comparing a transform size of a current block with a minimumtransform size. For instance, if a transform size of a current block isgreater than a minimum transform size, it may indicate that the codingunit is partitioned into coding units each of which has a half size. Ita transform size of a current block is not greater than a minimumtransform size, the adaptive transform size flag information mayindicate that a coding unit is not partitioned into coding units each ofwhich has a half size in horizontal and vertical directions. Inparticular, if a transform size of a current block is greater than aminimum transform size, the adaptive transform size flag information isderived into ‘1’ to check the adaptive transform size flag informationfor each sub-block. If a transform size of a current block is notgreater than a minimum transform size, the adaptive transform size flaginformation is derived into ‘0’ to apply the transform size of thecurrent block.

For example, assume that the adaptive transform size flag information isset to split transform unit flag. Referring to FIG. 2, if a size of acurrent macroblock (Block A) is 128×128, it may be able to select atleast one from 128×128, 64×64, 32×32, 16×16, 8×8 and 4×4 transform sizesin accordance with the split_transform_unit_flag. Thesplit_transform_unit_flag is extracted at a current macroblock (Block A)level. If the split_transform_unit_flag indicates a value set to 0, the128×128 transform size is applied. If the split_transform_unit_flagindicates a value set to 1, it may be able to obtain thesplit_transform_unit_flag for each of four 64×64 sub-blocks in thecurrent 128×128 macroblock.

If the split_transform_unit_flag obtained at 64×64 sub-block (block B)level indicates a value set to 0, 64×64 transform size is applied. Ifthe split_transform_unit_flag indicates a value set to 1, it may be ableto obtain the split_transform_unit_flag again for each of four 32×32sub-blocks in the 64×64 macroblock. Likewise, the above-describedprocess may be identically applicable to sub-blocks in the following.

The present invention may be able to define flag information indicatingthe transform size. For instance, referring to FIG. 3A and FIG. 3B, oneof 16×16, 8×8 and 4×4 transforms sizes may be selected in accordancewith transform_(—)16×16_size_flag or transform_(—)8×8_size_flag. In thiscase, the transform_(—)16×16_size_flag indicates whether a transformprocess is performed by 16×16 block unit or a block unit smaller thanthe 16×16 block unit. And, the transform_(—)16×16_size_flag can beobtained at a macroblock level. The transform_(—)8×8_size_flag indicateswhether a transform process is performed by 8×8 block unit or 4×4 blockunit and can be obtained at a sub-macroblock level. Referring to FIG.3A, if the transform_(—)16×16_size_flag indicates 1, a transform processmay be performed by 16×16 block unit. If thetransform_(—)16×16_size_flag indicates 0, the transform_(—)8×8_size_flagis checked. If the transform_(—)8×8_size_flag indicates 1, a transformprocess may be performed by 8×8 block unit. If thetransform_8×8_size_flag indicates 0, a transform process may beperformed by 4×4 block unit.

Likewise, referring to FIG. 3B, if the transform_(—)8×8_size_flagindicates 0, a transform process may be performed by 4×4 block unit. Ifthe transform_(—)8×8_size_flag indicates 1, thetransform_(—)16×16_size_flag is checked. If thetransform_(—)16×16_size_flag indicates 1, a transform process may beperformed by 16×16 block unit. If the transform_(—)16×16_size_flagindicates 0, a transform process may be performed by 8×8 block unit.

According to another embodiment of the present invention, in case that atransform size available in accordance with a size of macroblock is setin advance, a decoding apparatus may be able to derive flag informationindicating the transform size from itself instead of receiving the flaginformation. For instance, assuming that 8×8 transform size is not usedwhen a size of macroblock is 32×32, if transform 8×8 size flag indicates0, a transform process may be performed by 4×4 block unit. If thetransform_(—)8×8 size_flag indicates 1, a transform process may beperformed by 16×16 block unit. In this case, transform 16×16 size_flagmay be derived into 1. Likewise, when a size of macroblock is 8×8, iftransform_8×8_size_flag indicates 0, a transform process may beperformed by 4×4 block unit. If the transform_8×8_size_flag indicates 1,a transform process may be performed by 16×16 block unit. In this case,transform_(—)16×16_size_flag may be derived into 0.

According to another embodiment, assuming that 8×8 transform size isused for 8×8 block only, transform_(—)16×16_size_flag is transmittedonly to identify intra 8×8 block and intra 16×16 block from each other.And, transform_8×8_size_flag may be derived into 1 by a decodingapparatus. Moreover, assuming that 4×4 transform size is used for 8×8block only, transform_(—)16×16_size_flag is transmitted only to identifyintra 8×8 block and intra 16×16 block from each other. And,transform_8×8_size_flag may be derived into 0 or 1 by a decodingapparatus in accordance with a sub-macroblock type.

As mentioned in the above description, a transform size, a macroblocksize, flag information indicating a transform size and the like are justexemplary. And, 32×32, 32×16, 16×32, 16×16, 16×8, 8×16, 8×8, 8×4, 4×8,4×4 and sizes over 32×32 may be applicable all. Combination of 2 flaginformations in FIG. 2, FIG. 3A and FIG. 3B corresponds to oneembodiment. A transform size may be indicated by one flag information.And, various embodiments may be set by combining a plurality of flaginformations together.

FIG. 4 is a flowchart to describe a process for determining a transformscheme (DCT or KLT) based on a flag indicating a transform type or aprediction mode of a macroblock according to an embodiment of thepresent invention.

As mentioned in the foregoing description with reference to FIG. 2, FIG.3A and FIG. 3B, various transform schemes (e.g., DCT, KLT, etc.) may beapplicable in case of processing a video signal for coding efficiencyimprovement. For instance, an encoding apparatus may be able todetermine a transform scheme for rate-distortion optimization byapplying DCT, KLT or the like to each slice. The determined transformscheme may be coded as a syntax element and transmitted. And, thedetermined transform scheme may be defined in a macroblock layer, aslice header or a picture parameter set information. For detailedexample, an encoding apparatus applies DCT to a slice, calculates arate-distortion (RD) cost, applies KLT, and then calculates arate-distortion (RD) cost. If the RD cost of KLT is less than the RDcost of DCT, the KLT may be selected as a transform scheme for theslice. The encoding apparatus codes it into syntax element and thentransmits it. In this case, the syntax element may mean the flaginformation indicating a transform type.

For instance, referring to FIG. 4, a transform type flag informationindicating a transform type is obtained [S410]. If the transform typeflag information (transform_type_(—) flag) indicates 0, DCT is applied[S420]. If the transform type flag information indicates 1, DCT or KLTmay be applied based on a type of macroblock [S430]. If the type ofmacroblock indicates an intra block, KLT is applied [S450]. If the typeof macroblock is not the intra block, DCT may be applied [S440]. Aquantizing process is then performed on the data transformed in theabove manner [S460]. Thus, according to the present invention, atransform scheme suitable for each prediction mode is usable based on aprediction ode of macroblock.

FIG. 5 is a schematic block diagram to describe a new mode dependentdirectional transform for applying a different transform kernel inaccordance with a position of a transform block according to anembodiment of the present invention.

First of all, a mode dependent directional transform means a techniquefor improving coding efficiency in a manner of using a KLT dependenttransform scheme in accordance with a prediction mode used for intrablock coding and applying a scanning order differently in accordancewith each prediction mode. Referring to FIG. 5, a prediction unittransmits a prediction signal in accordance with each mode. A transformunit receives a residual signal indicating a difference between anoriginal signal and the prediction signal and then generates a transformcoefficient by transforming the residual signal. In doing so, thetransform unit may apply a separate transform kernel to a residualsignal in accordance with each mode. Thus, transform coefficientsgenerated in accordance with the respective prediction modes arequantized by a quantizing unit. Moreover, the mode dependent directionaltransform may be able to use a transform kernel for a horizontaltransform and a transform kernel for a vertical transform separately.

FIG. 6 is a diagram of a detailed example using a different transformkernel in accordance with a position of a transform block according toan embodiment of the present invention.

According to an embodiment of the present invention, a transform sizemay be equal to or smaller than a size of a prediction block. Forinstance, in case of 32×32 block, a transform size may correspond to oneof 32×32, 16×16, 8×8, and 4×4. In case of 16×16 block, a transform sizemay correspond to one of 16×16, 8×8, and 4×4. In case of 8×8 block, atransform size may correspond to one of 8×8 and 4×4. In case of 4×4block, a transform size may correspond to 4×4 only.

In case that a transform size 8×8 is applied to 16×16 block, the sametransform kernel may be applied to 4 transform blocks. Alternatively,referring to FIG. 6, it may be able to apply a transform kerneldifferent in accordance with a position of each transform block. In thiscase, 4 transform kernels may be necessary.

FIG. 7 is a flowchart to describe a process for rearranging a scan orderfor each transform block according to an embodiment of the presentinvention.

First of all, a scan order means an order for arranging transformcoefficients in 1-dimensional form. In particular, a coefficient of alower frequency is situated at a front side, while a coefficient of ahigher frequency is situated at a rear side. A transform coefficientdecoding process may be applicable to 4×4 luminance residual block, 8×8luminance residual block, luminance sample of intra 16×16 predictionmode, chrominance sample and the like. Moreover, as mentioned in theforegoing description, if a transform size gent bigger, a target blockor sample may increase correspondingly. For instance, a transformcoefficient decoding process may be applicable to 16×16 luminanceresidual block, 32×32 luminance residual block, luminance sample ofintra 32×32 prediction mode, chrominance sample and the like.

For example, in accordance with the transform_(—)16×16_size_flag andtransform_(—)8×8_size_flag described with reference to FIG. 3A and FIG.3B, if the flag informations indicate to perform a transform process by16×16 block unit, a transform coefficient decoding process may beapplicable to 16×16 luminance residual block. For another example, ifthe flag informations indicate to perform a transform process by 8×8block unit, a transform coefficient decoding process may be applicableto 8×8 luminance residual block.

According to one embodiment of the present invention, if a transformcoefficient decoding process is applied to 8×8 luminance residual block,64 values within the 8×8 luminance residual block are preferentially setto initial value according to a scan order. In this case, the 64 initialvalues may indicate transform coefficients and the scan order may mean azigzag scan. If the transform coefficients are rearranged in accordancewith a modified scan order, it may be able to decrement the number ofbits in case of run-length coding. In this case, the modified scan ordermay mean that a pixel position having a greatest number of non-zerotransform coefficients is set to a priority after calculating the numberof the non-zero transform coefficients. In particular, the number of thenon-zero transform coefficients may be updated by being calculated foreach macroblock or each transform block.

For instance, referring to FIG. 7, the number of non-zero transformcoefficients is counted at each pixel position in a 1^(st) transformblock within a macroblock [S710]. Subsequently, a scan order may bemodified in a manner that a pixel position having the greatest number ofnon-zero transform coefficients among pixel positions in the 1^(st)transform block is prioritized [S720]. Subsequently, the number ofnon-zero transform coefficients is determined at each pixel position ina 2^(nd) transform block and the modified scan order of the 1^(St)transform block may be used as an initialized scan order of the 2^(nd)transform block [S730]. In this case, each of the 1^(St) and 2^(nd)transform blocks indicates the block partitioned in one macroblock. Forinstance, if a current macroblock is 8×8 macroblock and a transformcoefficient decoding process is applied by 4×4 luminance residual blockunit within the current macroblock, a left top 4×4 block, a right top4×4 block, a left bottom 4×4 block and a right bottom 4×4 block may bedefined as a l^(st) transform block, a 2^(nd) transform block, a 3^(rd)transform block and a 4^(th) transform block, respectively. Such anorder of sub-blocks may be non-limited by the present embodiment.Subsequently, it may be able to modify a scan order of the 2^(nd)transform block in a manner of adding the number of the non-zerotransform coefficients at each pixel position in the 1^(st) transformblock and the number of the non-zero transform coefficients at eachpixel position within the 2^(nd) transform block and then prioritizingthe pixel position having the greatest number [S740]. Thus, through thescan order updating process, coding efficiency can be improved. And,corresponding examples shall be described in detail with reference toFIGS. 8A to 8D later.

The scan order updating process may be performed for each macroblock,each transform block or each block. After the scan order updatingprocess has been completed, initialization of the scan order isperformed. For this, flag information may be defined. For instance, ifscan order initialization flag information indicates 1, a scan order isinitialized for each macroblock or each transform block. If the scanorder initialization flag information indicates 0, the scan orderupdating process is performed again.

FIGS. 8A to 8D are diagrams of detailed examples to describe a processfor rearranging a scan order for each transform block according toembodiments of the present invention.

According to the present embodiment, if a current macroblock is 32×32macroblock and a transform coefficient decoding process is applied by16×16 block unit within a current macroblock, a left top 16×16 block, aright top 16×16 block, a left bottom 16×16 block and a right bottom16×16 block may be defined as a 1^(st) block, a 2^(nd) block, a 3^(rd)block and a 4^(th) block, respectively. In this case, each of the 1^(st)to 4^(th) blocks may mean a transform block. A gray block indicates thata non-zero transform coefficient is included. And, a numeral within thegray block indicates a scan order.

Referring to FIG. 8A, if non-zero transform coefficients arepreferentially counted within a 1^(st) block, it can be recognized thatthe non-zero transform coefficients exist in total 4 gray pixels. Aninitialized scan order follows a zigzag scan order. In this case, theinitialized scan order may be non-limited by the zigzag scan order. Incase of applying the zigzag scan order with reference to the non-zerotransform coefficient existing gray pixel, it may be able to obtain anupdated scan order as shown in FIG. 8A.

Referring to FIG. 8B, non-zero transform coefficients are preferentiallycounted within a 2^(nd) block. This counted number is added to thenumber of the non-zero transform coefficients in the 1^(st) block tocount the number of the finally cumulative non-zero transformcoefficients. As an initialized scan order of the 2^(nd) block, thefinally updated scan order in the 1^(st) block is used. Likewise, it maybe able to modify a scan order in a manner of prioritizing a pixelposition having the greatest number among the numbers of the finallycumulative non-zero transform coefficients.

Referring to FIG. 8C, non-zero transform coefficients are preferentiallycounted within a 3^(rd) block. This counted number is added to thenumber of the non-zero transform coefficients in the 2^(nd) block tocount the number of the finally cumulative non-zero transformcoefficients. As an initialized scan order of the 3^(rd) block, thefinally updated scan order in the 2^(nd) block is used. Likewise, it maybe able to modify a scan order in a manner of prioritizing a pixelposition having the greatest number among the numbers of the finallycumulative non-zero transform coefficients.

Likewise, referring to FIG. 8D, non-zero transform coefficients arepreferentially counted within a 4^(th) block. This counted number isadded to the number of the non-zero transform coefficients in the 3^(rd)block to count the number of the finally cumulative non-zero transformcoefficients. As an initialized scan order of the 4^(th) block, thefinally updated scan order in the 3^(rd) block is used. Likewise, it maybe able to modify a scan order in a manner of prioritizing a pixelposition having the greatest number among the numbers of the finallycumulative non-zero transform coefficients.

Thus, by updating a san order for each sub-block, coding efficiency canbe further improved. Instead of initializing a scan order for eachslice, flag information indicating whether a scan order isre-initialized can be defined in a slice header.

Thus, the transform coefficients arranged 1-dimensionally are decoded inaccordance with an updated scan order.

Meanwhile, as mentioned in the foregoing description with reference toFIG. 2, FIG. 3A and FIG. 3B, in case of processing a video signal ofhigh resolution, a transform size may be determined to be suitable forthe resolution of the video signal. In doing so, it may be necessary toprevent a redundant transmission of informations indicating whether anon-zero transform coefficient level is included. For instance, codedblock flag information (coded_block_flag) indicates whether a non-zerotransform coefficient level is included. If the coded block flaginformation (coded_block_flag) is set to 0, it indicates that thenon-zero transform coefficient level is not included. If the coded blockflag information (coded_block_flag) is set to 1, it indicates that atleast one non-zero transform coefficient level is included. As anotherflag information, block pattern information (coded_block_pattern)indicates whether four 8×8 luminance blocks and chrominance blocksrelated to the luminance blocks include non-zero transform coefficientlevel. The block pattern information (coded_block_pattern) is extractedfrom a macroblock layer if a prediction mode of a current macroblock isnot 16×16 prediction mode. In this case, the block pattern informationis a sort of a representative bit flag indicating a presence ornon-presence of a residual and may be able to indicate a residualpresence or non-presence of 16×16, 8×8 or 4×4 luminance block. Forinstance, if a current macroblock is present, the current macroblock ispartitioned into 4 equal parts. A let top block, a right top block, aleft bottom block and a right bottom block are then set to 0^(th) bit,1^(st) bit, 2^(nd) bit and 3^(rd) bit, respectively. Hence, it may beable to represent a presence or non-presence of a residual for eachblock. The block pattern information is represented as bits. Asmentioned in the foregoing description, a luminance block is representedas 0^(th) to 3^(rd) bit, while a chrominance block is represented a 2bits (AC and DC).

For instance, when a size of a current block is 16×16, if a transformcoefficient decoding process is applied by 16×16 block unit, a luminancecomponent of the block pattern information (coded block pattern) isreduced into 1 hit and the coded block flag information(coded_block_flag) may not be transmitted. For another instance, when asize of a current block is 16×16, if a transform coefficient decodingprocess is applied by 16×8/8×16 block unit, a luminance component of theblock pattern information (coded_block_pattern) is reduced into 2 bitsand the coded block flag information (coded_block_flag) may not betransmitted. For another instance, when a size of a current block is32×32, if a transform coefficient decoding process is applied by 16×16block unit, a luminance component of the block pattern information(coded_block_pattern) uses 4 bits and the coded block flag information(coded_block_flag) may not be transmitted.

Meanwhile, the coded block flag information (coded_block_flag) may beobtained based on adaptive transform size flag information, which isdescribed in detail with reference to FIG. 2. The adaptive transformsize flag information may be obtained in a manner of comparing a size ofa current transform unit to at least one of a minimum transform size anda maximum transform size. If the adaptive transform size flaginformation indicates that a coding unit is partitioned into codingunits each of which has a half size in horizontal and verticaldirections, a size of a transform unit is determined and a transformprocessing may be correspondingly performed. If the adaptive transformsize flag information indicates that a coding unit is not partitionedinto coding units each of which has a half size in horizontal andvertical directions, the coded block flag information (coded_block_flag)may be obtained.

As mentioned in the foregoing description, a decoding/encoding apparatusaccording to the present invention may be provided to atransmitter/receiver for multimedia broadcasting such as DMB (digitalmultimedia broadcast) to be used in decoding video signals, data signalsand the like. And, the multimedia broadcast transmitter/receiver mayinclude a mobile communication terminal.

A decoding/encoding method according to the present invention may beconfigured with a program for computer execution and then stored in acomputer-readable recording medium. And, multimedia data having a datastructure of the present invention can be stored in computer-readablerecording medium. The computer-readable recording media include allkinds of storage devices for storing data that can be read by a computersystem. The computer-readable recording medium may include one of ROM,RAM, CD-ROM, magnetic tapes, floppy discs, optical data storage devicesand the like and may be implemented with carrier waves (e.g.,transmission via internet). And, a bit stream generated by the encodingmethod may be saved in a computer-readable recording medium ortransmitted via wire/wireless communication network.

INDUSTRIAL APPLICABILITY

Accordingly, while the present invention has been described andillustrated herein with reference to the preferred embodiments thereof,it will be apparent to those skilled in the art that variousmodifications and variations can be made therein without departing fromthe spirit and scope of the invention. Thus, it is intended that thepresent invention covers the modifications and variations of thisinvention that come within the scope of the appended claims and theirequivalents.

1. A method for decoding a video signal by a decoding apparatus, themethod comprising: obtaining, by the decoding apparatus, splitindication information for a transform block from the video signal basedon a specific condition being satisfied, the split indicationinformation indicating whether the transform block is split into fourtransform sub-blocks, each transform sub-block having a half horizontalsize and a half vertical size of the transform block; based on the splitindication information for the transform block having a first value,partitioning, by the decoding apparatus, the transform block into thefour transform sub-blocks; and based on the split indication informationfor the transform block having a second value, performing, by thedecoding apparatus, a transform operation on the transform block toobtain pixel values of the transform block, wherein the specificcondition includes: a current size of the transform block being lessthan or equal to a maximum transform size, and the current size of thetransform block being greater than a minimum transform size, andwherein, based on the split indication information having the firstvalue, for each of the four transform sub-blocks, the decoding apparatusrepeats a procedure comprising: obtaining, by the decoding apparatus,split indication information for a transform sub-block from the videosignal, based on the split indication information for the transformsub-block having the first value, partitioning, by the decodingapparatus, the transform sub-block into four transform sub-sub-blocks,and based on the split indication information for the transformsub-block having the second value, performing, by the decodingapparatus, a transform operation on the transform sub-block to obtainpixel values of the transform sub-block.
 2. The method according toclaim 1, wherein the maximum transform size is 32×32 and the minimumtransform size is 4×4.
 3. The method according to claim 1, whereinperforming the transform operation includes obtaining transformcoefficient information from the video signal, and performing thetransform operation on the obtained transform coefficient information.4. The method according to claim 1, further comprising: obtaining codedblock flag information for the transform block from the video signalbased on the split indication information for the transform block havingthe second value, the coded block flag information for the transformblock indicating whether the transform block includes one or moretransform coefficient information not equal to
 0. 5. The methodaccording to claim 1, further comprising: obtaining coded block flaginformation for the transform sub-block from the video signal based onthe split indication information for the transform sub-block having thesecond value, the coded block flag information for the transformsub-block indicating whether the transform sub-block includes one ormore transform coefficient information not equal to
 0. 6. The methodaccording to claim 1, wherein, based on the current size of thetransform block being less than or equal to the minimum transform size,the split indication information is derived to have the second value. 7.The method according to claim 1, wherein the transform operationincludes a discrete cosine transform.
 8. An apparatus for decoding avideo signal, the apparatus comprising: a transform size determiningunit configured to obtain split indication information for a transformblock from the video signal based on a specific condition beingsatisfied, the split indication information indicating whether thetransform block is split into four transform sub-blocks, each transformsub-block having a half horizontal size and a half vertical size of thetransform block, and to partition the transform block into the fourtransform sub-blocks based on the split indication information for thetransform block having a first value: and a transform decoding unitconfigured to, based on the split indication information for thetransform block having a second value, perform a transform operation onthe transform block to obtain pixel values of the transform block,wherein the specific condition includes: a current size of the transformblock being less than or equal to a maximum transform size, and thecurrent size of the transform block being greater than a minimumtransform size, and wherein the transform size determining unit isfurther configured to, based on the split indication information havingthe first value, for each of the four transform sub-blocks, obtain splitindication information for a transform sub-block from the video signal,and based on the split indication information for the transformsub-block having the first value, partition the transform sub-block intofour transform sub-sub-blocks, and wherein the transform decoding unitis further configured to, based on the split indication information forthe transform sub-block having the second value, perform a transformoperation on the transform sub-block to obtain pixel values of thetransform sub-block.
 9. The apparatus according to claim 8, wherein themaximum transform size is 32×32 and the minimum transform size is 4×4.10. The apparatus according to claim 8, wherein performing the transformoperation includes obtaining transform coefficient information from thevideo signal, and performing the transform operation on the obtainedtransform coefficient information.
 11. The apparatus according to claim8, wherein the transform decoding unit is further configured to obtaincoded block flag information for the transform block from the videosignal based on the split indication information for the transform blockhaving the second value, the coded block flag information for thetransform block indicating whether the transform block includes one ormore transform coefficient information not equal to
 0. 12. The apparatusaccording to claim 8, wherein the transform decoding unit is furtherconfigured to obtain coded block flag information for the transformsub-block from the video signal based on the split indicationinformation for the transform sub-block having the second value, thecoded block flag information for the transform sub-block indicatingwhether the transform sub-block includes one or more transformcoefficient information not equal to
 0. 13. The apparatus according toclaim 8, wherein based on the current size of the transform block beingless than or equal to the minimum transform size, the split indicationinformation is derived to have the second value.
 14. The apparatusaccording to claim 8, wherein the transform operation includes adiscrete cosine transform.